Imports System.IO

Module ReadAllDemo
    Sub Main()
        Dim FileError As Boolean = False
        Dim TextFile As StreamReader
        Try

            TextFile = New StreamReader("C:\Sach.txt")
            Dim Content As String= TextFile.ReadToEnd()
            Console.WriteLine(Content)
        Catch E As Exception
            Console.WriteLine("Loi mo file")
        End Try

        TextFile.Close()

        Console.ReadLine()
    End Sub

End Module
